package io;

import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.ObjectOutputStream;

public class OOSDemo {
    public static void main(String[] args) throws IOException {
        String name="迟佳祺";
        int age =24;
        String gender="女";
        String[] otherInfo ={"是一个学生","喜欢赖叽","贼能赖叽"};
        Student cjq =new Student(name,age,gender,otherInfo);
        System.out.println(cjq);

        FileOutputStream fos =new FileOutputStream("student.txt");
        ObjectOutputStream oos =new ObjectOutputStream(fos);
        oos.writeObject(cjq);
        System.out.println("ok");
        oos.close();
    }
}
